package com.itheima.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.itheima.constant.MessageConst;
import com.itheima.entity.Result;
import com.itheima.service.MenuShowService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/menuShow")
@Slf4j
public class MenuShowController {
    @Reference
    MenuShowService menuShowService;
    @RequestMapping("/findMenu")
    public Result findMenu(String username){
        log.debug("菜单动态显示");
        List<Map<String,Object>> list =menuShowService.findMenu(username);
        return new Result(true, MessageConst.QUERY_MENUSHOW_SUCCESS,list);
    }
}
